package com.zyx.service;

import com.summer.BeanPostProcessor;
import com.summer.Component;

@Component
public class ZyxBeanPostProcessor implements BeanPostProcessor {
    @Override
    public Object postProcessBeforeInitialization(Object bean, String beanName) {
        if (beanName.equals("userService")) {
            System.out.println("userService before init");
        }
        return bean;
    }

    @Override
    public Object postProcessAfterInitialization(Object bean, String beanName) {
        if (beanName.equals("userService")) {
            System.out.println("userService after init");
        }
        return bean;
    }
}
